const app = getApp()
const { getMeetingPeople } = require("../../utils/http/api")
const tool = require("../../utils/tool")
Page({

  /**
   * 页面的初始数据
   */
  data: {
    //获取全局变量 导航栏的高度statusBarHeight
    top: Number(app.globalData.menu.top),
    height: Number(app.globalData.menu.height),
    peopleList:[]
  },

  onShow() {
    this.getPeopleList()
  },
  // 获取大会教授
  getPeopleList() {
    wx.showLoading({
      title: '加载中...',
    })
    let _this = this
    getMeetingPeople().then(res => {
      console.log("重磅教授",res)
      if (res.rows) {
        const peopleList = res.rows
        peopleList.forEach(item => {
          item.participantsContent = tool.changeDetails(item.participantsContent,15)
        })
        _this.setData({
          peopleList
        })
        wx.hideLoading()
      }
    })
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})